]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
aggregateLayout: Fix natural width computation
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 25 Feb 2019 22:31:45 +0000 (23:31 +0100)
committerJonas Ådahl <jadahl@gmail.com>
Tue, 26 Feb 2019 08:25:00 +0000 (08:25 +0000)
Ouch, this went unnoticed for a long time: As the minimum size of menu
items is generally small (because its label can be ellipsized), we are
requesting the unellipsized width of the last "size child" instead of
the widest one.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/996

js/ui/panel.js

index f32e7f218147a4cba4dca8625602c68a5d5ce1a1..2e2a6592d4d3869daf03b35eeb330a5d41ed907d 100644 (file)
@@ -729,7 +729,7 @@ class AggregateLayout extends Clutter.BoxLayout {
             let child = this._sizeChildren[i];
             let [childMin, childNat] = child.get_preferred_width(forHeight);
             minWidth = Math.max(minWidth, childMin);
-            natWidth = Math.max(minWidth, childNat);
+            natWidth = Math.max(natWidth, childNat);
         }
         return [minWidth, natWidth];
     }